﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace Smart.Service
{
    /// <summary>
    /// XML服务参数解析对象
    /// </summary>
    public class XmlServiceParser : IServiceParser
    {
        /// <summary>
        /// 使用XDocument解析参数对象，返回 XmlServiceRequest 实体对象
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public IServiceRequest Parse(string args)
        {
            var doc = XDocument.Parse(args);
            return new XmlServiceRequest(doc.Root);
        }
    }
}
